home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2002 #11 / Amiga Plus CD - 2002 - No. 11.iso / Tools / Freeware / DiskMaster / Rexx / DMSelectByDate.rexx < prev    next >
OS/2 REXX Batch file  |  2002-10-27  |  759b  |  35 lines

  1. /* $VER: DMSelectByDate.rexx 1.0 (30.3.98) by J. Tierney
  2.  
  3.   DiskMaster II Select by Date  v1.0
  4.   3/30/98  J. Tierney <jtierney@cyberlink-inc.com>
  5.  
  6.   Purpose:  Select files according to their date.
  7.  
  8.   Usage:  Rexx DMSelectByDate.rexx
  9.  
  10.  
  11.   Note:  Specify the date(s) to match as you would for the AmigaDOS List
  12.         command.  Ex:  SINCE 08-May-92
  13. */
  14.  
  15. OPTIONS RESULTS
  16.  
  17. 'CONFIRM "Date(s) to match (d-mmm-y):" Okay Cancel "SINCE  UPTO"'
  18. IF rc = 1 THEN EXIT 0
  19. datematch = STRIP(result, 'B')
  20.  
  21. 'STATUS P'
  22. dir = result
  23.  
  24. who = ADDRESS()
  25. tmpfile = 'PIPE:DateMatch.' || who
  26.  
  27. ADDRESS COMMAND 'List >' || tmpfile dir datematch 'LFORMAT %N'
  28.  
  29. CALL OPEN('fh', tmpfile, 'R')
  30. DO UNTIL EOF('fh')
  31.   fname = READLN('fh')
  32.   IF fname ~= '' THEN 'SELECT' fname
  33. END
  34. CALL CLOSE('fh')
  35.